//
//  CZWheelButton.m
//  A01-CZ彩票
//
//  Created by apple on 15-6-14.
//  Copyright (c) 2015年 itcast. All rights reserved.
//

#import "CZWheelButton.h"

@implementation CZWheelButton

//设置imageView的大小和位置
//- (void)layoutSubviews{
//    [super layoutSubviews];
//    
//}

- (void)setHighlighted:(BOOL)highlighted{

}

//快速创建自定义button的对象。并且传递按钮中imageView的大小
+ (instancetype)wheelButton:(CGFloat)imgW imgH:(CGFloat)imgH{
    CZWheelButton *btn = [CZWheelButton new];
    btn.imgW = imgW;
    btn.imgH = imgH;
    
    return btn;
}

//返回按钮中imageView的frame
- (CGRect)imageRectForContentRect:(CGRect)contentRect{
    CGFloat x = (contentRect.size.width - self.imgW) * 0.5;
    CGFloat y = 20;
    
    return CGRectMake(x, y, self.imgW, self.imgH);
}

//返回按钮中titleLabel的frame
//- (CGRect)titleRectForContentRect:(CGRect)contentRect{
//
//}


@end
